package cn.com.backstage.controller;

import java.io.PrintWriter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Date;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import cn.com.api.entity.ApiU_message;

import cn.com.api.service.ApiU_messageService;
import cn.com.backstage.controller.base.U_messageBaseController;

import cn.com.util.*;

@Controller
@RequestMapping(Utils.SYS_BACKSTAGE + "/")
public class U_messageController extends U_messageBaseController {

	private static Logger logger = Logger.getLogger(U_messageController.class);

	@Autowired
	private ApiU_messageService apiU_messageService;

	/**
	 * 查看系统消息
	 * 
	 * @return
	 */
	@RequestMapping(value = "sysmessagelist")
	public ModelAndView u_message_list(HttpServletRequest request, HttpServletResponse response) throws Exception {
		ModelAndView mv = new ModelAndView("forward:/backstage/u_message_list.jsp");
		List<ApiU_message> u_messages = apiU_messageService.getSysMessageList();
		mv.addObject("u_messages", u_messages);
		return mv;
	}

}
